                <!-- table -->
				<div class="box">
					<!-- box / title -->
					<div class="title">
						<h5>
                            <?=$title;?>
                            <?php if($no!='-')
                                echo lang('no').' '.$no.' Periode ' .$periode ;
                            ?>
                        </h5>
						<div class="search">
                        <?php if($no!='-'): ?>
                            <?=form_open('cashflow/cash/getPettyCashExport')?>
								<div class="input">
                                    <label class="search"><?=lang('export')?></label>
									<?=form_dropdown('export',config('export'))?>
								</div>
								<div class="button">
									<?=form_submit('submit',lang('export'))?>
								</div>
							<?=form_close()?>
                        
                        <?php else:?>
                            <?=form_open('cashflow/cash/getPettyCash')?>
								<div class="input">
                                    <?=form_input('no')?>
								</div>
     
                                <div class="input">
									<?=form_dropdown('cash',$cashs,'','style="width:150px"')?>
								</div>
								<div class="button">
									<input type="submit" name="submit" value="Search" />
								</div>
							<?=form_close()?>
                         <?php endif;?>   
						</div>
					</div>
					<!-- end box / title -->
					<div class="table">
                    
                        <?php if($this->session->flashdata('success')):?>
						<div id="message-success" class="message message-success">
							<div class="image">
								<img src="resources/images/icons/success.png" alt="Success" height="32" />
							</div>
							<div class="text">
								<h6>Send Email</h6>
								<span>Send Email Success to Recipient , to Edit email set to Settings Menu !</span>
							</div>
							<div class="dismiss">
									<a href="#message-success"></a>
							</div>
						</div>
						<?php elseif($this->session->flashdata('error')):?>
						<div id="message-error" class="message message-error">
								<div class="image">
									<img src="resources/images/icons/error.png" alt="Error" height="32" />
								</div>
								<div class="text">
									<h6>Send Email</h6>
									<span>Send Email Error to Recipient , to Edit email set to Settings Menu !</span>
								</div>
								<div class="dismiss">
									<a href="#message-error"></a>
								</div>
						</div>
						<?php endif;?>
                        
                        
                        <?php if($no!='-'):?>
                        <div class="action">
                            <?=anchor('cashflow/cash/getPettyCashReset','Kembali Ke Awal');?>
			         	</div>
                        <?php endif;?>
                        
						<table>
							<thead>
								<tr>
									<th><?=lang('no')?></th>
                                    <th><?=lang('bpk_no')?></th>
                                    <th><?=lang('name')?></th>
                                    <th><?=lang('dept')?></th>
                                    <th><?=lang('description')?></th>
                                    <th><?=lang('coa_no')?></th>
                                    <th><?=lang('total')?></th>
								</tr>
							</thead>
							<tbody>
                                <?php 
                                    $i=1;
                                    $total = 0;
                                    foreach($petty_cash as $row): ?>
                                <tr>
                                    <td><?=$i?></td>
                                    <td><?=$row['NomorPO']?></td>
                                    <td><?=$row['PIC']?></td>
                                    <td><?=$row['DeptID']?></td>
                                    <td><?=$row['Keterangan']?></td>
                                    <td><?=$row['MataAnggaran']?></td>
                                    <td><?=decimal($row['Credit'],2)?></td>
                                </tr>
                                <?php
                                    $i++;
                                    $total = $total + $row['Credit'];
                                    $ca    = $row['Total_CA'];  
                                    endforeach;?>
							</tbody>
                            <?php if(COUNT($petty_cash)):?>
                            <tfoot>
                                <tr>
									<th></th>
                                    <th></th>
                                    <th></th>
                                    <th></th>
                                    <th></th>
                                    <th class="right"><?=lang('total')?></th>
                                    <th class="right"><?=decimal($total,2)?></th>
								</tr>
                                <tr>
									<th></th>
                                    <th></th>
                                    <th></th>
                                    <th></th>
                                    <th></th>
                                    <th class="right"><?=lang('ca')?></th>
                                    <th class="right"><?=decimal($ca,2)?></th>
								</tr>
                                <tr>
									<th></th>
                                    <th></th>
                                    <th></th>
                                    <th></th>
                                    <th></th>
                                    <th class="right"><?=lang('cash')?></th>
                                    <th class="right"><?=decimal($cash=$saldo['Saldo']-$total,2)?></th>
								</tr>
                                <tr>
									<th></th>
                                    <th></th>
                                    <th></th>
                                    <th></th>
                                    <th></th>
                                    <th class="right"><?=lang('fixed_cash')?></th>
                                    <th class="right"><?=decimal($saldo['Saldo'],2)?></th>
								</tr>
                            </tfoot>
                            <?php endif;?>
						</table>
                        
                        <?php if($no!='-'):?>
                        <div class="action">
                            <?=anchor('cashflow/cash/getPettyCashReset','Kembali Ke Awal');?>
			         	</div>
                        <?php endif;?>
                        
					</div>
				</div>
				<!-- end table -->